3.416 \(\int \frac{A+B x}{x \sqrt{a+b x}} \, dx\)

Optimal. Leaf size=40 \[ \frac{2 B \sqrt{a+b x}}{b}-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}} \]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi [A]  time = 0.0521687, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ \frac{2 B \sqrt{a+b x}}{b}-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.69373, size = 36, normalized size = 0.9 \[ - \frac{2 A \operatorname{atanh}{\left (\frac{\sqrt{a + b x}}{\sqrt{a}} \right )}}{\sqrt{a}} + \frac{2 B \sqrt{a + b x}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/x/(b*x+a)**(1/2),x)

[Out]

-2*A*atanh(sqrt(a + b*x)/sqrt(a))/sqrt(a) + 2*B*sqrt(a + b*x)/b

_______________________________________________________________________________________

Mathematica [A]  time = 0.0399851, size = 40, normalized size = 1. \[ \frac{2 B \sqrt{a+b x}}{b}-\frac{2 A \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/(x*Sqrt[a + b*x]),x]

[Out]

(2*B*Sqrt[a + b*x])/b - (2*A*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 35, normalized size = 0.9 \[ 2\,{\frac{1}{b} \left ( B\sqrt{bx+a}-{\frac{Ab}{\sqrt{a}}{\it Artanh} \left ({\frac{\sqrt{bx+a}}{\sqrt{a}}} \right ) } \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/x/(b*x+a)^(1/2),x)

[Out]

2/b*(B*(b*x+a)^(1/2)-A*b/a^(1/2)*arctanh((b*x+a)^(1/2)/a^(1/2)))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x + a)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.2303, size = 1, normalized size = 0.02 \[ \left [\frac{A b \log \left (\frac{{\left (b x + 2 \, a\right )} \sqrt{a} - 2 \, \sqrt{b x + a} a}{x}\right ) + 2 \, \sqrt{b x + a} B \sqrt{a}}{\sqrt{a} b}, \frac{2 \,{\left (A b \arctan \left (\frac{a}{\sqrt{b x + a} \sqrt{-a}}\right ) + \sqrt{b x + a} B \sqrt{-a}\right )}}{\sqrt{-a} b}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x + a)*x),x, algorithm="fricas")

[Out]

[(A*b*log(((b*x + 2*a)*sqrt(a) - 2*sqrt(b*x + a)*a)/x) + 2*sqrt(b*x + a)*B*sqrt(
a))/(sqrt(a)*b), 2*(A*b*arctan(a/(sqrt(b*x + a)*sqrt(-a))) + sqrt(b*x + a)*B*sqr
t(-a))/(sqrt(-a)*b)]

_______________________________________________________________________________________

Sympy [A]  time = 8.59006, size = 129, normalized size = 3.22 \[ 2 A \left (\begin{cases} \frac{\operatorname{atan}{\left (\frac{1}{\sqrt{- \frac{1}{a}} \sqrt{a + b x}} \right )}}{a \sqrt{- \frac{1}{a}}} & \text{for}\: - \frac{1}{a} > 0 \\- \frac{\operatorname{acoth}{\left (\frac{1}{\sqrt{a + b x} \sqrt{\frac{1}{a}}} \right )}}{a \sqrt{\frac{1}{a}}} & \text{for}\: - \frac{1}{a} < 0 \wedge \frac{1}{a} < \frac{1}{a + b x} \\- \frac{\operatorname{atanh}{\left (\frac{1}{\sqrt{a + b x} \sqrt{\frac{1}{a}}} \right )}}{a \sqrt{\frac{1}{a}}} & \text{for}\: \frac{1}{a} > \frac{1}{a + b x} \wedge - \frac{1}{a} < 0 \end{cases}\right ) + \frac{2 B \sqrt{a + b x}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/x/(b*x+a)**(1/2),x)

[Out]

2*A*Piecewise((atan(1/(sqrt(-1/a)*sqrt(a + b*x)))/(a*sqrt(-1/a)), -1/a > 0), (-a
coth(1/(sqrt(a + b*x)*sqrt(1/a)))/(a*sqrt(1/a)), (-1/a < 0) & (1/a < 1/(a + b*x)
)), (-atanh(1/(sqrt(a + b*x)*sqrt(1/a)))/(a*sqrt(1/a)), (-1/a < 0) & (1/a > 1/(a
 + b*x)))) + 2*B*sqrt(a + b*x)/b

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.215158, size = 49, normalized size = 1.22 \[ \frac{2 \, A \arctan \left (\frac{\sqrt{b x + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} + \frac{2 \, \sqrt{b x + a} B}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x + a)*x),x, algorithm="giac")

[Out]

2*A*arctan(sqrt(b*x + a)/sqrt(-a))/sqrt(-a) + 2*sqrt(b*x + a)*B/b